<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>home</title>
<style type="text/css">
body {
font-size: 12px;
font-family:sans-serif;
}
</style>

<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/main.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/ext/js/bootstrap.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/Galary.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/Viewer.js"></script>
    
<script type="text/javascript">
Ext.onReady(
	function(){
		var uploader = Ext.create('com.fansy.Galary', {
			opt: {imageCls:'uploader',
				basePath: '<%=request.getContextPath()%>'
			}
		});
		
		var viewer = Ext.create('com.fansy.Viewer', {
			opt: {imageCls:'view',
				basePath: '<%=request.getContextPath()%>',
				action: '/main/waterfall.do'
			}
		});
		
		Ext.create('Ext.panel.Panel',{
			layout:{
				type: 'hbox'				
			},
			bodyStyle: {
				border: '0px'
			},
			style: {
				width: '250px',
				margin: '80px auto 0px auto'				
			},
			items:[uploader, viewer],
			renderTo: Ext.get('main')						
			
		});
	}
);
</script>
</head>
<body>

<form id="picForm" name="picForm" method="post" enctype="multipart/form-data" style="display:none">
<input type="hidden" id="txt" name="txt" value="hello" />
</form>
<div id="main"></div>
<div id="galary">
</div>
</body>
</html>